package com.aloudmeta.grpc.client.support;

import com.github.luben.zstd.ZstdInputStream;
import io.grpc.Decompressor;

import java.io.IOException;
import java.io.InputStream;

public class ZstdDecompressor implements Decompressor {

    @Override
    public String getMessageEncoding() {
        return "zstd";
    }

    @Override
    public InputStream decompress(InputStream is) throws IOException {
        return new ZstdInputStream(is);
    }
}
